from django.http import HttpResponse
import datetime
from django.template.loader import get_template
from django.template import Context

def hello(request):
	return HttpResponse("hello world")

def current_date(request):
	now = datetime.datetime.now()
#	html = '<html><body>current time is %s</body></html>' % now
	t = get_template('current_date.html')
	c = Context({'current_date':now})
	html = t.render(c)
	return HttpResponse(html)

def time_plus(request,offset):
	try:
		offset = int(offset)
	except ValueError:
		raise Http404()
	dt = datetime.datetime.now() + datetime.timedelta(hours=offset)
	html = '<html><body>%s : %s</body></html>' % (offset , dt)
	return HttpResponse(html)
a = 6
def printDir():
	if __name__ == '__main__':
		print dir()
printDir()
print dir()
del a
printDir()
print dir()
